package com.xmy.cultivate.feign;

import com.xmy.cultivate.config.FeignConfig;
import com.xmy.cultivate.entity.CancellationRate;
import com.xmy.cultivate.entity.response.ArrivalRate;
import com.xmy.cultivate.entity.response.LackRecourseRate;
import com.xmy.cultivate.entity.views.MathChaPlan;
import com.xmy.cultivate.entity.views.PassRade;
import com.xmy.cultivate.entity.views.RenewClassRecord;
import com.xmy.cultivate.entity.views.ScoreData;
import com.xmy.cultivate.util.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

@FeignClient(value = "teacher")
public interface ITeacherFeignClient {

    /**
     * 到课率
     */
    @GetMapping("/api/recordCourse/arrivalRateIFeign")
    public List<ArrivalRate> arrivalRate(@RequestParam(value = "type", required = false, defaultValue = "1") Integer type,
                                         @RequestParam(value = "trackId", required = false, defaultValue = "") String trackId,
                                         @RequestParam(value = "subjectsId", required = false, defaultValue = "") String subjectsId,
                                         @RequestParam(value = "teacherName", required = false, defaultValue = "") String teacherName,
                                         @RequestParam(value = "startDate", required = false, defaultValue = "") String startDate,
                                         @RequestParam(value = "endDate", required = false, defaultValue = "") String endDate,
                                         @RequestParam(value = "isTeamDetails", required = false, defaultValue = "") String isTeamDetails,
                                         @RequestParam(value = "classify", required = false, defaultValue = "") String classify,
                                         @RequestParam(value = "trackType", required = false, defaultValue = "") String trackType,
                                         @RequestParam(value = "teamId", required = false, defaultValue = "") String teamId,
                                         @RequestParam(value = "gradeSection", required = false, defaultValue = "") String gradeSection,
                                         @RequestParam(value = "yearPart", required = false, defaultValue = "") String yearPartParam,
                                         @RequestParam(value = "quarterNum", required = false, defaultValue = "") String quarterNumParam,
                                         @RequestParam(value = "schoolId", defaultValue = "") String schoolId,
                                         @RequestParam(value = "timeStart", required = false, defaultValue = "") String timeStart,
                                         @RequestParam(value = "timeEnd", required = false, defaultValue = "") String timeEnd,
                                         @RequestParam(value = "yearClassId", required = false, defaultValue = "0,1,2,3,4,5,6,7,8,9") String yearClassId,
                                         @RequestParam(value = "lessonType", required = false, defaultValue = "1") String lessonType,
                                         @RequestParam(value = "isCall", required = false, defaultValue = "0") String isCall,
                                         @RequestParam(value = "startLessonNum", required = false, defaultValue = "") String startLessonNum,
                                         @RequestParam(value = "endLessonNum", required = false, defaultValue = "") String endLessonNum,
                                         @RequestParam(value = "name", required = false) String name,
                                         @RequestParam(value = "teacherId", required = false) String teacherId,
                                         @RequestParam(value = "isRebrush", required = false, defaultValue = "0") String isRebrush, // 0正常，1复刷
                                         @RequestParam(value = "isYearClass", required = false, defaultValue = "0") String isYearClass); // 0正常，1年级到课率


    /**
     * 准时率、迟到率
     */
    @GetMapping("/api/recordCourse/tardinessRateIFeign")
    public List<ArrivalRate> tardinessRateIFeign(
            @RequestParam(value = "yearPart", required = false, defaultValue = "") String yearPartParam,
            @RequestParam(value = "quarterNum", required = false, defaultValue = "") String quarterNumParam,
            @RequestParam(value = "schoolIdList", defaultValue = "") String[] schoolIdList,
            @RequestParam(value = "timeStart", required = false, defaultValue = "") String timeStart,
            @RequestParam(value = "timeEnd", required = false, defaultValue = "") String timeEnd,
            @RequestParam(value = "yearClassId", required = false, defaultValue = "0,1,2,3,4,5,6,7,8,9") String yearClassId,
            @RequestParam(value = "lessonType", required = false, defaultValue = "1") String lessonType,
            @RequestParam(value = "startLessonNum", required = false, defaultValue = "") String startLessonNum,
            @RequestParam(value = "endLessonNum", required = false, defaultValue = "") String endLessonNum,
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "subjectsId", required = false) String subjectsId,
            @RequestParam(value = "isTeamDetails", required = false) String isTeamDetails,
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "trackType", required = false) String trackType,
            @RequestParam(value = "teamId", required = false) String teamId,
            @RequestParam(value = "teacherName", required = false) String teacherName,
            @RequestParam(value = "startDate", required = false) String startDate,
            @RequestParam(value = "endDate", required = false) String endDate,
            @RequestParam(value = "schoolId", required = false) String schoolId,
            @RequestParam(value = "type", required = false, defaultValue = "1") Integer type,
            @RequestParam(value = "trackId", required = false, defaultValue = "") String trackId,
            @RequestParam(value = "teacherId", required = false) String teacherId,
            @RequestParam(value = "isRebrush", required = false, defaultValue = "0") String isRebrush, // 0正常，1复刷
            @RequestParam(value = "isYearClass", required = false, defaultValue = "0") String isYearClass // 0正常，1年级到课率
    );


    @GetMapping("/api/recordCourse/cancellationRateIfeign")
    @ApiOperation("获取消课率列表，数据统计用")
    public List<CancellationRate> cancellationRateIfeign(@RequestParam(value = "schoolId", required = false, defaultValue = "") String schoolId,
                                                         @RequestParam(value = "subjectsId", required = false, defaultValue = "1,2,3") String subjectsId,
                                                         @RequestParam(value = "yearPart", required = false, defaultValue = "") Integer yearPart,
                                                         @RequestParam(value = "quarterNum", required = false, defaultValue = "") Integer quarterNum,
                                                         @RequestParam(value = "startDate", required = false, defaultValue = "") String startDate,
                                                         @RequestParam(value = "endDate", required = false, defaultValue = "") String endDate,
                                                         @RequestParam(value = "teamId", required = false, defaultValue = "") String teamId,
                                                         @RequestParam(value = "classify", required = false, defaultValue = "") String classify,
                                                         @RequestParam(value = "type", required = false, defaultValue = "") Integer type,
                                                         @RequestParam(value = "yearClassId", required = false, defaultValue = "0,1,2,3,4,5,6,7,8,9") String yearClassId,
                                                         @RequestParam(value = "trackType", required = false, defaultValue = "") String trackType,
                                                         @RequestParam(value = "startLessonNum", required = false, defaultValue = "") String startLessonNum,
                                                         @RequestParam(value = "endLessonNum", required = false, defaultValue = "") String endLessonNum,
                                                         @RequestParam(value = "classTypeId", required = false, defaultValue = "") String classTypeIdStr,
                                                         @RequestParam(value = "lessonType", required = false, defaultValue = "1") String lessonType,
                                                         @RequestParam(value = "teacherId", required = false, defaultValue = "") String teacherId
    );

    /**
     * 英语通关率
     */
    @GetMapping("/api/studyPlan/getMinimumTaskProgressRateIFeign")
    public List<PassRade> getMinimumTaskProgressRateIFeign(
            @RequestParam(value = "yearPart", defaultValue = "", required = false) String yearPart,
            @RequestParam(value = "quarterNum", defaultValue = "", required = false) String quarterNum,
            @RequestParam(value = "yearClassId", defaultValue = "0,1,2,3,4,5,6,7,8,9", required = false) String yearClassId,
            @RequestParam(value = "classTypeId", defaultValue = "", required = false) String classTypeId,
            @RequestParam(value = "gradeSection", defaultValue = "", required = false) String gradeSection,
            @RequestParam(value = "type", defaultValue = "1", required = false) Integer type,
            @RequestParam(value = "tabsType", defaultValue = "1", required = false) Integer tabsType,
            @RequestParam(value = "readingStatus", defaultValue = "1", required = false) String readingStatus,// 不包含
            @RequestParam(value = "courseTypeId", defaultValue = "", required = false) String courseTypeId,
            @RequestParam(value = "taskDateStart", defaultValue = "", required = false) String taskDateStart,
            @RequestParam(value = "taskDateEnd", defaultValue = "", required = false) String taskDateEnd,
            @RequestParam(value = "schoolId", defaultValue = "", required = false) String schoolId,
            @RequestParam(value = "include", defaultValue = "", required = false) String include,
            @RequestParam(value = "teamId", defaultValue = "", required = false) String teamId,
            @RequestParam(value = "classify", defaultValue = "", required = false) String classify,
            @RequestParam(value = "trackType", defaultValue = "", required = false) String trackType,
            @RequestParam(value = "taskCourseNumNow", defaultValue = "", required = false) Integer taskCourseNumNow,
            @RequestParam(value = "taskCourseNum", defaultValue = "", required = false) Integer taskCourseNum,
            @RequestParam(value = "teacherId", defaultValue = "", required = false) String teacherId,
            @RequestParam(value = "categoryId", defaultValue = "1", required = false) String categoryId
    );


    /**
     * 数学通关率、正确率
     */
    @GetMapping("/api/math/getPassRadeListIFeign")
    public List<MathChaPlan> getPassRadeListIFeign(
            @RequestParam(value = "schoolId", required = false) String schoolId,
            @RequestParam(value = "yearPart", required = false) String yearPart,
            @RequestParam(value = "quarterNum", required = false) String quarterNum,
            @RequestParam(value = "type", required = false) String type,
            @RequestParam(value = "lessonNumStart", required = false, defaultValue = "0") String lessonNumStart,
            @RequestParam(value = "lessonNum", required = false) String lessonNum,
            @RequestParam(value = "yearClassId", required = false, defaultValue = "0,1,2,3,4,5,6,7,8,9") String yearClassId,
            @RequestParam(value = "gradeSection", required = false) String gradeSection,
            @RequestParam(value = "classTypeId", required = false) String classTypeId,
            @RequestParam(value = "readingType", required = false, defaultValue = "1") String readingType,
            @RequestParam(value = "passDate", required = false) String passDate,
            @RequestParam(value = "passDateStart", required = false) String passDateStart,
            @RequestParam(value = "passDateEnd", required = false) String passDateEnd,
            @RequestParam(value = "subjectsId", required = false, defaultValue = "2") String subjectsId,
            @RequestParam(value = "rightNumStartDate", required = false) String rightNumStartDateGet,
            @RequestParam(value = "rightNumEndDate", required = false) String rightNumEndDateGet,
            @RequestParam(value = "trackId", required = false) String trackId,
            @RequestParam(value = "listState", required = false, defaultValue = "0") String listState,//0原来的列表；1安班级来列出
            @RequestParam(value = "radeType", required = false) String radeType,
            @RequestParam(value = "teacherId", required = false) String teacherId,
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "isYearClass", required = false, defaultValue = "0") Integer isYearClass, // 是否根据年级分组，0否，1是
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "trackType", required = false) String trackType,
            @RequestParam(value = "teamId", required = false) String teamId,
            @RequestParam(value = "include", required = false) String include,//0三次课以内，1三次课以外
            @RequestParam(value = "inType", required = false, defaultValue = "1") String inType,
            @RequestParam(value = "categoryId", defaultValue = "1", required = false) Integer categoryId,
            @RequestParam(value = "isAchieve", defaultValue = "0", required = false) String isAchieve, // 0通关率、录入、完成率、正确率、修正率，1复刷完成率
            @RequestParam(value = "moldType", required = false, defaultValue = "1") String moldType, // 1正常通关率、2到勤通关率
            @RequestParam(value = "examSchedulingtType", required = false, defaultValue = "0") String examSchedulingtType //  0全部 1已过刷题排班时间 2未到刷题排班时间

    );

    /**
     * 物理通关率、正确率
     */
    @GetMapping("/api/physics/getPassRadeListIFeign")
    public List<MathChaPlan> getPhysicsPassRadeListIFeign(
            @RequestParam(value = "schoolId", required = false) String schoolId,
            @RequestParam(value = "yearPart", required = false) String yearPart,
            @RequestParam(value = "quarterNum", required = false) String quarterNum,
            @RequestParam(value = "type", required = false) String type,
            @RequestParam(value = "lessonNumStart", required = false, defaultValue = "0") String lessonNumStart,
            @RequestParam(value = "lessonNum", required = false) String lessonNum,
            @RequestParam(value = "yearClassId", required = false, defaultValue = "0,1,2,3,4,5,6,7,8,9") String yearClassId,
            @RequestParam(value = "gradeSection", required = false) String gradeSection,
            @RequestParam(value = "classTypeId", required = false) String classTypeId,
            @RequestParam(value = "readingType", required = false, defaultValue = "1") String readingType,
            @RequestParam(value = "passDate", required = false) String passDate,
            @RequestParam(value = "passDateStart", required = false) String passDateStart,
            @RequestParam(value = "passDateEnd", required = false) String passDateEnd,
            @RequestParam(value = "subjectsId", required = false, defaultValue = "3") String subjectsId,
            @RequestParam(value = "rightNumStartDate", required = false) String rightNumStartDateGet,
            @RequestParam(value = "rightNumEndDate", required = false) String rightNumEndDateGet,
            @RequestParam(value = "trackId", required = false) String trackId,
            @RequestParam(value = "listState", required = false, defaultValue = "0") String listState,//0原来的列表；1安班级来列出
            @RequestParam(value = "radeType", required = false) String radeType,
            @RequestParam(value = "teacherId", required = false) String teacherId,
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "isYearClass", required = false, defaultValue = "0") Integer isYearClass, // 是否根据年级分组，0否，1是
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "trackType", required = false) String trackType,
            @RequestParam(value = "teamId", required = false) String teamId,
            @RequestParam(value = "include", required = false) String include,//0三次课以内，1三次课以外
            @RequestParam(value = "inType", required = false, defaultValue = "1") String inType,
            @RequestParam(value = "categoryId", defaultValue = "1", required = false) Integer categoryId,
            @RequestParam(value = "isAchieve", defaultValue = "0", required = false) String isAchieve, // 0通关率、录入、完成率、正确率、修正率，1复刷完成率
            @RequestParam(value = "moldType", required = false, defaultValue = "1") String moldType, // 1正常通关率、2到勤通关率
            @RequestParam(value = "examSchedulingtType", required = false, defaultValue = "0") String examSchedulingtType //  0全部 1已过刷题排班时间 2未到刷题排班时间
    );

    /**
     * 缺课补课率
     */
    @GetMapping("/api/lackCourseLog/getRepairLackRadeIFeign")
    public List<LackRecourseRate> getRepairLackRadeIFeign(
            @RequestParam(value = "yearPart", required = true) Integer yearPart,
            @RequestParam(value = "quarterNum", required = true) Integer quarterNum,
            @RequestParam(value = "schoolId", required = false, defaultValue = "") String schoolId,
            @RequestParam(value = "subjectsId", required = false) String subjectsId,
            @RequestParam(value = "trackId", required = false) Long trackId,
            @RequestParam(value = "type", required = true) Integer type,
            @RequestParam(value = "startLessonNum", required = false) String startLessonNum,
            @RequestParam(value = "endLessonNum", required = false) String endLessonNum,
            @RequestParam(value = "startDate", required = false) String startDate,
            @RequestParam(value = "endDate", required = false) String endDate,
            @RequestParam(value = "teamId", required = false) String teamId,
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "trackType", required = false) String trackType,
            @RequestParam(value = "yearClassId", required = false, defaultValue = "0,1,2,3,4,5,6,7,8,9") String yearClassId,
            @RequestParam(value = "classTypeId", required = false, defaultValue = "") String classTypeIdStr,
            @RequestParam(value = "lessonType", required = false, defaultValue = "1") String lessonType
    );

    /**
     * 成绩数据
     */
    @GetMapping("/api/transcript/scoreDataListIFeign")
    public List<ScoreData> scoreDataListIFeign(
            @RequestParam(value = "schoolId", defaultValue = "") String schoolId,
            @RequestParam(value = "subjectsId", defaultValue = "") String subjectsId,
            @RequestParam(value = "yearPart", defaultValue = "") String yearPart,
            @RequestParam(value = "quarterNum", defaultValue = "") String quarterNum,
            @RequestParam(value = "examNum", defaultValue = "") String examNum,
            @RequestParam(value = "yearClassId", defaultValue = "3,4,5,6,7,8,9") String yearClassId,
            @RequestParam(value = "include", defaultValue = "1") String include,
            @RequestParam(value = "type", defaultValue = "") String type,
            @RequestParam(value = "classify", defaultValue = "") String classify,
            @RequestParam(value = "trackType", defaultValue = "") String trackType,
            @RequestParam(value = "teamId", defaultValue = "") String teamId,
            @RequestParam(value = "courseTypeId", defaultValue = "") String courseTypeId,
            @RequestParam(value = "gradeSection", defaultValue = "") String gradeSection
    );

    /**
     * 缴费率
     */
    @GetMapping("/api/renewClass/payFeeIFeign")
    public List<RenewClassRecord> payFeeIFeign(
            @RequestParam(value = "schoolId", defaultValue = "", required = false) String schoolId,
            @RequestParam(value = "teacherId", defaultValue = "", required = false) String teacherId,
            @RequestParam(value = "yearPart", defaultValue = "", required = false) Integer yearPart,
            @RequestParam(value = "quarterNum", defaultValue = "", required = false) Integer quarterNum,
            @RequestParam(value = "yearClassId", defaultValue = "0,1,2,3,4,5,6,7,8,9", required = false) String yearClassId,
            @RequestParam(value = "classTypeId", defaultValue = "", required = false) String classTypeId,
            @RequestParam(value = "periodsNum", defaultValue = "1", required = false) Integer periodsNum,
            @RequestParam(value = "lessonType", defaultValue = "1", required = false) Integer lessonType,
            @RequestParam(value = "subjectsId", required = false) String subjectsId,
            @RequestParam(value = "type", defaultValue = "1", required = false) Integer type,
            @RequestParam(value = "trackId", required = false) String trackId,
            @RequestParam(value = "startDate", required = false) String startDate,
            @RequestParam(value = "endDate", required = false) String endDate,
            @RequestParam(value = "timeStart", required = false, defaultValue = "") String timeStart,
            @RequestParam(value = "timeEnd", required = false, defaultValue = "") String timeEnd,
            @RequestParam(value = "isCourseScheduling", defaultValue = "0", required = false) Integer isCourseScheduling,// 是否为到课未缴数据，0否1是
            @RequestParam(value = "isDetails", defaultValue = "0", required = false) Integer isDetails,// 是否为详情，0否1是
            @RequestParam(value = "paymentStaff", defaultValue = "1", required = false) Integer paymentStaff,// 1教学主管，2市场，3年级负责人，4火种，5个人（全职），6小校区主管
            @RequestParam(value = "paymentStaffType", defaultValue = "1", required = false) Integer paymentStaffType,// 1个人赛道，2管理赛道
            @RequestParam(value = "versionNum", defaultValue = "1", required = false) Integer versionNum,//版本号，1之前的版本（个人、校区老师、四大校区……），2优化后的版本（教学主管、市场、年级负责人……）
            @RequestParam(value = "name", required = false) String name
    );

}